<?php /* Smarty version Smarty-3.0.9, created on 2013-12-04 15:51:47
         compiled from "templates\mostrar_peticiones.tpl" */ ?>
<?php /*%%SmartyHeaderCode:15278529f4183c4df10-05046275%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c5d3dd5a2e05ddc3c26396451a861077025f4988' => 
    array (
      0 => 'templates\\mostrar_peticiones.tpl',
      1 => 1386168704,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '15278529f4183c4df10-05046275',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
 
    <script src="<?php echo $_smarty_tpl->getVariable('gvar')->value['l_global'];?>
js/mostrar_peticiones.js"></script>
 
<div class="square">
    <div>
        <div>
            <!--action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l_global'];?>
revisar_peticion.php?option=modificar_estado" method="post"--> 
            <form  class="form-horizontal">
                <div id="titleForm">
                    <span>Peticiones recientes</span>
                    <input class="btn btn-success escribirPeticion"  name="enviar" id="escribirpeticion" value="Escribir o responder una petición">
                </div>
                <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('peticiones')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?>
                    <div class="control-group">                        
                        <div class="controls5">
                            <div class="contentTopPeticion">
                                <span class="contentAlltopPeticion"><span class="contentuserDate">(By: <span class="username"><?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('usuario');?>
</span>)</span><label class="titulPeticion1"><?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('asunto');?>
</label></span>
                                <span class="contentDate"><?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('fecha_envio');?>
</span>                            
                            </div>
                            <div class="contentBodyPeticion">
                            <label class="contenidoPeticion"><?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('descripcion');?>
</label>
                            
                                <?php $_smarty_tpl->tpl_vars["name1"] = new Smarty_variable(($_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->components['p_r']), null, null);?>
                                <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['j']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('name1')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['name'] = 'j';
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['j']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['j']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['j']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['j']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['j']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['j']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['j']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['j']['total']);
?>
                                    <div class="contentRespuestas">
                                    <div class="contentDescripcionRespuesta"><span class="descripcionRespuestas"><?php echo $_smarty_tpl->getVariable('name1')->value[$_smarty_tpl->getVariable('smarty')->value['section']['j']['index']]->get('descripcion');?>
</span></div> 
                                    <div class="contentRespuestaUserDate"><span class="usuarioRespuesta"><?php echo $_smarty_tpl->getVariable('name1')->value[$_smarty_tpl->getVariable('smarty')->value['section']['j']['index']]->get('usuario');?>
</span>
                                        <span class="fecha_envioRespuesta"><?php echo $_smarty_tpl->getVariable('name1')->value[$_smarty_tpl->getVariable('smarty')->value['section']['j']['index']]->get('fecha_envio');?>
</span> </div>
                                     </div>
                                <?php endfor; endif; ?>
                                
                           
                             
                                 <div class="optionsTools">
                                     
                                     <a href="#dialog-form" data-id="<?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('id');?>
" class="modalOpen btn btn-info" type="button" data-toggle="modal"> Responder</a> 
                                     <?php ob_start();?><?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('usuario');?>
<?php $_tmp1=ob_get_clean();?><?php if (($_SESSION['usuario']['username']==$_tmp1)||$_SESSION['usuario']['tipo']=='lider'){?>
                                     <span class=""><input   onclick="location.href='enviar_peticion.php?option=responder&usuario=<?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('usuario');?>
&id=<?php echo $_smarty_tpl->getVariable('peticiones')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('id');?>
'" class="btn btn-primary buttonClosePeticion" value="Cerrar"/> </span>
                                    <span class=""><input class="btn btn-warning buttonDeletePeticion" value="Eliminar"/> </span>
                                 <?php }?>
                                 </div>
                             
                            </div>
                        </div>
                    </div>
                        
                   <?php endfor; endif; ?>
                 <div class="control-group text-right">
                    
                </div>                
            </form>
        </div>    
    </div>
</div>
    
   
    <!--M O D A L-->
    
     <!--M O D A L-->
     
      <!--M O D A L-->
<div id="dialog-form" title="Create new user" class="modal hide">
  <div id="formEnviarPeticion">
            <form action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l_global'];?>
enviar_peticion.php?option=responder" method="post" class="form-horizontal">
                <div id="titleForm">
                    <span>Enviar petición</span>
                </div>
                <div class="control-group">
                    <label class="control-label">Asunto: </label>
                    <div class="controls">
                        <input type="text" autofocus="true" name="asunto" class="input-large"/>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">Descripcion: </label>
                    <div class="controls">
                        <textarea name="descripcion" id="peticionDescripcion2"></textarea>
                    </div>
                </div>              
                <div class="control-group text-right">
                    <input class="btn btn-success" type="submit" name="enviar" id="enviar" value="Enviar">
                </div>    
                <input type="hidden" id="idpeticionopen" name="idpeticionopen"/>
            </form>
        </div>  
</div>